<script type="text/javascript" src="${base}/scripts/htgl/bght_detail.js"></script>
<div id="bght_tabs" class="easyui-tabs" detail="true" data-options="fit:true,border:false">
<div title="合同信息">
    <table style="width: 100%" class="tb tab-t t-bor">
        <input type="hidden" name="bght_name_id" value="${(bght.id)!}"/>
        <input type="hidden" name="htdy_name_id" value="${(htdyId)!''}"/>
        <col width="90px"/>
        <col width=""/>
        <col width="90px"/>
        <col width=""/>
        <col width="90px"/>
        <col width=""/>
        <tr>
            <th>路径名称：</th>
            <td colspan="5">
            ${(bght.lj.mc)!}
            </td>
        </tr>
        <tr>
            <th>合同类型：</th>
            <td>
                保供合同
            </td>
            <th>供应商：</th>
            <td>
            ${(bght.hzf.qc)!}
            </td>
            <th>结束日期：</th>
            <td>
            ${(bght.jsrq?date)!}
            </td>
        </tr>
        <tr>
            <th>招标比价：</th>
            <td>
            <#if bght.zbbj?? && bght.zbbj==1>比价<#else>招标</#if>
            </td>
            <th>资金合同标志：</th>
            <td>
            ${(bght.zjhtbz.z)!''}
            </td>
            <th>常规寄售：</th>
            <td>
            ${(bght.cgjs.z)!''}
            </td>
        </tr>
        <tr>
            <th>签订日期：</th>
            <td>
            ${(bght.qdrq?date)!}
            </td>
            <th>签订地点：</th>
            <td>
            ${(bght.qddd)!}
            </td>
            <th>付款方式：</th>
            <td>
            ${(bght.fkfs.z)!''}
            </td>
        </tr>
        <tr>
            <th>交货时间：</th>
            <td>
            ${(bght.jhsj?date)!}
            </td>
            <th>交货地点：</th>
            <td>
            ${(bght.jhdd)!}
            </td>
            <th>交货方式：</th>
            <td>
            ${(bght.jhfs)!}
            </td>
        </tr>
        <tr>
            <th>税率(%)：</th>
            <td>
            ${(bght.sl?string(",##0.0000"))!}
            </td>
            <th>采购公司：</th>
            <td>
            ${(bght.wlfgs.jc)!}
            </td>
            <th>采购部门：</th>
            <td>
            ${(bght.wlfbm.qc)!}
            </td>
        </tr>
        <tr>
            <th>申报公司：</th>
            <td>
            ${(bght.sbgs.jc)!}
            </td>
            <th>申报部门：</th>
            <td>
            ${(bght.sbbm.qc)!}
            </td>
            <th>申&nbsp;报&nbsp;&nbsp;人：</th>
            <td>
            ${(bght.sbr.xm)!}
            </td>
        </tr>
        <tr>
            <th>备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注：</th>
            <td colspan="5">
            ${(bght.bz)!}
            </td>
        </tr>
        <tr>
            <th>附&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;件：</th>
            <td class="lian" colspan="5">
            <#if bght.fjList??>
                <#list bght.fjList as fj>
                    <span class="uploadify-queue-item fileName" style="height:65px;text-align: center;">
                            <a href="${base}/base/fj/downLoadFj?fjId=${fj.id}" class="previewImg"
                               rel="previewImg_${(bght.id)!}" title="${(fj.ccmc)!}"
                               style="display:block;margin: 0 auto;">
                                <img src="${base}/base/fj/downLoadFj?fjId=${fj.id}" width="50" height="50"/>
                            </a>
                            <a href="javascript:void(0);"
                               onclick="window.location.href='${base}/base/fj/downLoadFj?fjId=${fj.id}'">下载
                            </a>
                        </span>
                </#list>
            </#if>
            </td>
        </tr>
        <tr>
            <th>制&nbsp;单&nbsp;&nbsp;人：</th>
            <td>${(bght.createUser.xm)!}</td>
            <th>制单时间：</th>
            <td colspan="3">${(bght.dateCreated?datetime)!}</td>
        </tr>
    </table>

</div>
<div title="合同明细">
    <div id="bghtmx_detail_toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><a href="javascript:void(0);" name="exp" class="undo" plain="true">导出</a></li>
            </ul>
        </div>
    </div>
    <table id="bght_bghtmx_table" class="easyui-datagrid"
           url="${base}/htgl/bghtgl/bghtgldetail_htmx?bghtId=${(bght.id)!}" toolbar="#bghtmx_detail_toolbar"
           rownumbers="true" fit="true" fitColumns="true" pagination="true" showFooter="true">
        <thead>
        <tr>
            <th data-options="field:'wzgg.oldcode',width:40,align:'center'">老物资编码</th>
            <#--<th data-options="field:'wzgg.code',width:40,align:'center'">新物资编码</th>-->
            <th data-options="field:'wzgg.name',width:25,align:'center'">物资名称</th>
            <th data-options="field:'wzgg.ggxh',width:30,align:'center'">规格型号</th>
            <th data-options="field:'wzgg.dw',width:15,align:'center'">单位</th>
        <#--<th data-options="field:'cd.z',width:25">产地</th>-->
        <#--<th data-options="field:'ck',width:20">长宽</th>-->
            <th data-options="field:'sbsl',width:40,align:'right',formatter:formatSlForHtml">数量</th>
            <th data-options="field:'jzfs.z',width:25,align:'center'">记重方式</th>
            <th data-options="field:'hsj',width:40,formatter:formatJeForHtml,align:'right'">含税价</th>
            <th data-options="field:'bhsj',width:40,formatter:formatJeForHtml,align:'right'">不含税价</th>
            <th data-options="field:'hsje',width:40,formatter:formatJeForHtml2,align:'right'">含税金额</th>
            <th data-options="field:'ph',width:15,align:'center'">牌号</th>
            <th data-options="field:'jthsjsl',width:40,align:'right'">交提货时间及数量</th>
        </tr>
        </thead>
    </table>
</div>
<div title="采购记录">
    <table id="bght_cgjl_table" class="easyui-datagrid" url="${base}/cggl/cgdgl/cgjlList?cghtId=${(bght.id)!}"
           rownumbers="true" fit="true" fitColumns="true" pagination="true">
        <thead>
        <tr>
            <th data-options="field:'cgdh',width:60,align:'center'">采购单号</th>
            <th data-options="field:'fhrq',width:30,align:'center'">发货日期</th>
            <th data-options="field:'gys_qc',width:60,align:'center'">供应商名称</th>
            <th data-options="field:'cglx',width:13,align:'center'">采购类型</th>
            <th data-options="field:'sbgs_qc',width:60,align:'center'">申报公司</th>
            <th data-options="field:'sbbm_qc',width:25,align:'center'">申报部门</th>
            <th data-options="field:'sbr_xm',width:10,align:'center'">申报人</th>
        </tr>
        </thead>
    </table>
</div>
<div title="付款记录">
    <table id="bght_fkjl_table" class="easyui-datagrid" url="${base}/sfgl/fksh/fkshByCghtList?cghtId=${(bght.id)!}"
           rownumbers="true" fit="true" fitColumns="true" pagination="true">
        <thead>
        <tr>
            <th data-options="field:'bm',width:60,align:'center'">单据号</th>
            <th data-options="field:'sfklx',width:15,align:'center'">付款类型</th>
            <th data-options="field:'gldw_jc',width:30,align:'center'">关联企业</th>
            <th data-options="field:'sfje',width:15,formatter:formatSlForHtml2,align:'right'">付款金额</th>
            <th data-options="field:'kxlx',width:15,align:'center'">款项类型</th>
            <th data-options="field:'pjlx_z',width:20,align:'center'">票据类型</th>
            <th data-options="field:'sbgs_jc',width:25,align:'center'">申报公司</th>
            <th data-options="field:'sbr_xm',width:20,align:'center'">申报人</th>
            <th data-options="field:'bz',width:15,align:'center'">备注</th>
        </tr>
        </thead>
    </table>
</div>
<div title="付款方式">
    <table id="bght_fkfs_id" class="easyui-datagrid" url="${base}/htgl/bghtgl/bght_fkfsList?bghtId=${(bght.id)!}"
           rownumbers="true" fit="true" fitColumns="true" pagination="true">
        <thead>
        <tr>
            <th data-options="field:'fksj',width:30,align:'center'">发票进账后几个月应付</th>
            <th data-options="field:'fkbl',width:10,align:'right'">比例(%)</th>
        </tr>
        </thead>
    </table>
</div>
<div title="合同文本" style="overflow:hidden">
    <div id="-toolbar">
        <div class="PTools">
            <ul class="niu">
                <li><a class="she" href="javascript:void(0);" onclick="checkIsInstall('BGHT_')">检查插件</a></li>
                <li><a class="watch" href="javascript:void(0);"
                       onclick="printPreview('BGHT_','${(bghtHtbm)!}','${(bghtEmwtime)!}')">打印</a></li>
                <#--<li><a class="pen" href="javascript:void(0);"-->
                       <#--onclick="print('BGHT_','${(bghtHtbm)!}','${(bghtEmwtime)!}')">打印</a></li>-->
            </ul>
        </div>
    </div>
    <div style="overflow: auto;height:90%">
        <object id="BGHT_LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0>
            <embed id="BGHT_LODOP_EM" type="application/x-print-lodop" width=0 height=0
                   pluginspage="install_lodop32.exe"></embed>
        </object>
        <div id="htwb_bght_detail_id" class="textcon"></div>
    </div>
</div>
</div>